<template>
	<view class="container">
	<view class="list" v-for="(item,index) in dataList" :key="index">
		<image class="work-image" :src="item.thumb" mode="aspectFit" @click="gotoPath(item.id)"></image>
		<view class="list_list">
			<text>{{item.name}}</text>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				dataList:[]
			}
			
		},
		onLoad() {
			uni.request({
				url: 'https://baiyi.kent.work/api/v1/system/getConstructionList',
				method: 'POST',
				data: {
					"total": 18,
					"page": 1, 
					"limit": 10, 
				},
				success: res => {
					this.dataList=res.data.data.list
				},
				fail: () => {},
				complete: () => {}
			});
		},
		methods:{
			gotoPath(id){
				uni.navigateTo({
					url: '../../pages/sitedatails/sitedatails?id='+id,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>

<style>

	.work-image {
		width: 100%;
		height: 406rpx;
		vertical-align:middle;
	}

	.list_list>text {
		display: flex;
		flex-direction: column;
		align-items: center;
		
		padding-top: 14rpx;
		font-size: 24rpx;
	}

	.list_list {
		width: 670rpx;
		height: 74rpx;
		background: #ffffff;
		border-radius: 0rpx 0rpx 12rpx 12rpx;
		margin-left: 40rpx;
	}
	.list{
		margin-top: 40rpx;
		margin-bottom: 20rpx;
	}
</style>
